/*
 * @Author: mayijun
 * @Date: 2022-08-09 18:39:13
 * @LastEditors: mayijun
 * @LastEditTime: 2022-08-09 18:39:21
 */
import * as RouteNames from '@/router/consts';
import router from '@/router';
import { store } from '@/store';
import { Plus } from '@element-plus/icons-vue';

// 指标平台
const IndexScenesManage = {
  [RouteNames.ROUTE_INDEXSCENESMANAGE]: (to: any) => {
    store.commit('breadcrumb/setPathname', to.path);
    store.commit('breadcrumb/setRawPath', to);
    store.commit('breadcrumb/setFullPath', to.fullPath);
    store.commit('breadcrumb/setName', to.name);
    store.commit('breadcrumb/setShowReturn', false); //是否显示返回

    store.commit('breadcrumb/setAddonActions', [
      {
        getAddon: () => {
          return (
            <el-button
              class="right-btn"
              type="primary"
            >
              <el-icon>
                <Plus />
              </el-icon>{' '}
              创建场景
            </el-button>
          );
        }
      }
    ]);
  }
};

export default IndexScenesManage;
